package com.example.train.model;

import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;

/**
    * 后台用户角色和权限关系表
    */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class SysRolePermissionRelation implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    @NotEmpty
    private Long roleId;

    @NotEmpty
    private Long permissionId;

    public SysRolePermissionRelation(@NotEmpty Long roleId, @NotEmpty Long permissionId) {
        this.roleId = roleId;
        this.permissionId = permissionId;
    }
}
